# pip install gitpython

from git import Repo

def main(c):
    path = r'D:\StudyProject\BlogProject\GiteeShare\share'
    repo = Repo(path)
    git = repo.git
    git.add('.')
    git.commit('-m', c)
    git.push("origin", "master")

if __name__ == '__main__':
    main("update")
    input("提交完成！")
